//
//  PCNavigationController.m
//  NavgationController
//
//  Created by sr Liu on 2020/7/15.
//  Copyright © 2020 sr Liu. All rights reserved.
//

#import "PCNavigationController.h"
#import "UIViewController+HideNavBar.h"
@implementation PCNavigationController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.delegate = self;
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (viewController) {
        BOOL isHidden = viewController.hiddenNavBarWhenPushed;
        [self setNavigationBarHidden:isHidden animated:animated];
    }
}
- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden {
    return self.topViewController;
}
@end
